<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Laporan extends CI_Controller {

    function __construct() {
        parent::__construct();

        /* Standard Libraries of codeigniter are required */
        $this->load->database();
        $this->load->helper('url');
        /* ------------------ */

        $this->load->library('ExCRUD');
    }

    function transaksi() {
        $crud = new ExCRUD();
        $crud->standartCheck();

        //$crud->set_theme("datatables");
        // 1. set table & relation        
        $crud->set_table('v_laporan_transaksi');
        $crud->set_primary_key("id_transaksi");
        $crud->order_by('id_transaksi', 'desc');
        $crud->set_add(false);
        $crud->set_edit(false);
        $crud->set_delete(false);
        
        // render it dude
        $output = $crud->render();
        $this->load->view('template/view_admin', $output);
    }
    
    function mutasi_poin() {
        $crud = new ExCRUD();
        $crud->standartCheck();

        //$crud->set_theme("datatables");
        // 1. set table & relation        
        $crud->set_table('v_mutasi_poin');
        $crud->set_primary_key("id_mutasi");
        $crud->order_by('id_mutasi', 'desc');
        $crud->set_add(false);
        $crud->set_edit(false);
        $crud->set_delete(false);
        
        // render it dude
        $output = $crud->render();
        $this->load->view('template/view_admin', $output);
    }
    
    function hasil_pooling(){
        $crud = new ExCRUD();
        $crud->standartCheck();

        //$crud->set_theme("datatables");
        // 1. set table & relation        
        $crud->set_table('v_hasil_pooling');
        $crud->set_primary_key("id_tour");
        $crud->order_by('jumlah_pemilih', 'desc');
        $crud->set_add(false);
        $crud->set_edit(false);
        $crud->set_delete(false);
        
        // render it dude
        $output = $crud->render();
        $this->load->view('template/view_admin', $output);
    }

    function neraca_poin() {
        $this->load->view('template/neraca_poin');
    }

}

/* End of file main.php */
/* Location: ./application/controllers/main.php */